import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

/**
 * element-ui
 */
import {
	Button,
	Autocomplete,
	Backtop,
	Icon,
	Image,
	Form,
	FormItem,
	Input,
	Message,
	Skeleton,
	SkeletonItem,
	MessageBox
} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Button);
Vue.use(Autocomplete);
Vue.use(Backtop);
Vue.use(Icon);
Vue.use(Image);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Input);
Vue.use(Skeleton);
Vue.use(SkeletonItem);
Vue.prototype.$message = Message;
Vue.prototype.$confirm = MessageBox.confirm;
import {
	BASE_URL
} from '@/puigins/request.js'

Vue.prototype.$g = {
	BASE_URL,
	IMG_URL: BASE_URL + 'img/',
}

Vue.prototype.$msgError=function(res){
	console.error(res)
	this.$message.error(res.data)
}

new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app')
